package com.dnjn.happiness.biz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.happiness.biz.domain.Communicate;
import com.dnjn.happiness.biz.domain.CommunicateVO;
import com.dnjn.happiness.biz.domain.vo.CommunicateBean;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisVO;

import java.util.List;

/**
 * <p>
 * 沟通 服务类
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface ICommunicateService extends IService<Communicate> {

    boolean handleScoreEvent(Long userId, Integer score);

    int saveCommunicate(Communicate communicate);


    void updateComSurvyId(Long surveyId, Long communicateId);


    Page<Communicate> queryComByUserId(Communicate domain, Page<Object> communicate_id);

    Communicate getCommunicateIdById(Long communicateId);

    /**
     * 查询当前用户最近几天被沟通过
     *
     * @param userId
     * @return 近多少天被沟通过
     */
    Integer getCommunicateCount(Long userId);

    /**
     * 根据用户ID查询最近一条沟通记录
     *
     * @param userId
     * @return
     */
    Communicate getCommunicateByUserId(Long userId);

    Page<CommunicateVO> queryCommunicateTeam(Communicate domain, Page<Object> communicate_id);

    void getCountByUserId(List<CommunicateVO> records);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisCommunicate(Integer count, String symbol, Integer likeCounts, String symbol1, Page<Object> happiness_score);


    Communicate getResult(Long userId, String lastTime, String scoreTime);

    //去指派
    int toAssignCommunicate(Communicate communicate);

    //填写沟通结果
    int editResultCommunicate(Communicate communicate);

    Page<Communicate> getCommunicatePage(Page page, Communicate communicate);

    void deleteByStatus(String value);


    Page<Communicate> getPage(Page page, Communicate communicate);

    List<Communicate> getCommunicatePageByFromUserId(Communicate communicate);

    void getWeekScoreChange(List<Communicate> list);

    void updateResultCommunicate(Communicate communicate);

    List<CommunicateBean> queryCommunicateByUserId(Long userId);

    List<Long> queryCommunicatRequired();

    List<Long> queryYesterdayyCommunicatRequired();

    List<Communicate> getByScoreTime(String dateNow, String yesterday);

    void updateCommunicateWhenCommunicating(Long userId, String scoreTime, Integer happinessScores);
}
